package com.chat.service;

import com.chat.common.Message;
import com.chat.common.MessageType;
import com.chat.common.User;
import com.chat.view.CommonListData;
import javafx.application.Platform;

import java.util.ArrayList;
import static com.chat.view.CommonPharseController.com;

/*
  获取常用语
 */
public class CommonPharse {
       public void get(String userid){
              Message msg=new Message();
              msg.setMesType(MessageType.MESSAGE_GET_COMMON_PHARSE);
              User user=new User();
              user.setUsername(userid);
              msg.setData(user);
              ClientConnectServerThread clientConnectServerThread= ManageClientConnectServerThread.getClientConnectServerThread(userid);
              clientConnectServerThread.send(msg);
       }//获取常用语



       public void del(String commonlang,String userid){
             Message msg=new Message();
             msg.setMesType(MessageType.MESSAGE_DEL_COMMON_PHARSE);
             User user=new User();
             user.setUsername(userid);
             user.setCommonpharse(commonlang);
             msg.setData(user);
             ClientConnectServerThread clientConnectServerThread=ManageClientConnectServerThread.getClientConnectServerThread(userid);
             clientConnectServerThread.send(msg);
       }//删除常用语
}
